California Department of Fish and Wildlife’s Office of Spill Prevention and Response (OSPR) Incident Tracking Database is a statewide oil spill tracking information system. The data are collected by OSPR Field response Team members for Marine oil spills and by OSPR Inland Pollution Coordinators and Wardens for Inland incidents. This analysis uses the data to create an interactive map showing the location of oil spill events and a static chloropleth map dependent on the inland oil spill event counts by county for 2008.
# Read in the CA county data (TIGER shapefile)
ca_counties <- read_sf("ca_counties", layer = "CA_Counties_TIGER2016") %>%
clean_names() %>%
dplyr::select(name)
# Read in the oil spill data (ds394 shapefile)
oil_spill <- read_sf("ds394", layer = "ds394") %>%
clean_names()
# Check the projections
st_crs(ca_counties) # WGS84
st_crs(oil_spill) # NAD83
# Transform CA counties to match oil spill data CRS
ca_counties <- st_transform(ca_counties, st_crs(oil_spill))
st_crs(ca_counties) # NAD83
# Exploratory ggplot
ggplot() +
geom_sf(data = ca_counties) +
geom_sf(data = oil_spill)
# Exploratory interactive map showing the location of oil spill events
tmap_mode("view")
tm_basemap("Stamen.Watercolor") +
tm_shape(ca_counties) +
tm_polygons() +
tm_shape(oil_spill) +
tm_dots()